#ifndef FACTORY_H
#define FACTORY_H

#include <QWidget>
#include "iexportable.h"

namespace Ui {
class Factory;
}

class IDataExport;
class Factory : public QWidget, public IExportable
{
    Q_OBJECT

public:
    explicit Factory(QWidget *parent = nullptr);
    ~Factory();

    void save(const QString &path);

private slots:
    void changeFactoryConfigPageIndexSlot(int index);
    void retranslateUiSlot();

    void onChangePage(bool checked);
    void onSaveOscilloscopeParam();
    void onSaveVoltageCalibParam();
    void onSaveFlowRateCalibParam();
    void onSaveProductConfig();
    void onMotorCalibClicked();
    void onDebugButtonClicked();
    void onDebugInputLostFocus();
    void onDebugCheckboxChanged();
    void onDebugVolumeChanging();
    void onDebugVolumeChanged();
    void onDebugRebootStateChanged();

private:
    void initWidget();
    void initParams();

private:
    Ui::Factory *ui;
    int m_volume;
    IDataExport *exportMgr;
};

#endif // FACTORY_H
